import React, { useEffect, useState } from 'react'
import { useCount } from '../hooks/useCount'




const Child2 = (props) => {
  const {count,start,stop} = useCount(10)


  return (
    <div className='box1'>

      <button onClick={start}>开始</button>
      <button onClick={stop}>暂停</button>
      Child2
      <p>{count}</p>
    </div>
    
  )
}

export default Child2